import request from '@/utils/request'
import type { ResultObj } from './type/common'
import type { LoginResult } from './type/login'

export function login(account: { accountName: string; password: string }) {
  return request.post<ResultObj<LoginResult>>('/login', account)
}

export function logout() {
  return request.post<ResultObj<boolean>>('/logout')
}
